package com.micro.service.service;

import com.micro.service.dao.UserInfoDao;
import com.micro.service.model.UserInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Create by Vic Xu on 2019/3/6
 */
@Service
public class UserInfoServiceImpl implements UserInfoService {

    @Autowired
    private UserInfoDao userInfoDao;

    @Override
    public List<UserInfo> getAllUserInfo() {
        return userInfoDao.getAllUserInfo();
    }

    @Override
    public UserInfo getUserInfoById(String id) {
        return userInfoDao.getUserInfoById(id);
    }

    @Override
    public int saveUser(UserInfo userInfo) {
        return userInfoDao.saveUser(userInfo);
    }

    @Override
    public int batchSaveUser(List<UserInfo> userInfos) {
        return userInfoDao.batchSaveUser(userInfos);
    }

    @Override
    public int updateUser(UserInfo userInfo) {
        return userInfoDao.updateUser(userInfo);
    }

    @Override
    public int deleteUser(String id) {
        return userInfoDao.deleteUser(id);
    }
}
